package com.itechart.watchfacts.domain;

import javax.persistence.*;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: E.Krasnotschek
 * Date: 7/22/13
 * Time: 7:54 AM
 * To change this template use File | Settings | File Templates.
 */

@Entity
@Table(name = "WATCH_ENTRY")
@PrimaryKeyJoinColumn(name="ID")
public class WatchEntry extends SearchEntry{

    @ManyToOne()
    @JoinColumn(name = "MOVEMENT_ID")
    private MovementType movementType;
    
    @Column(name = "BRACELET")
    private String braceletMaterial;

    @ManyToOne()
    @JoinColumn(name = "DIAL_COLOR_ID")
    private Color dialColor;

    @ManyToMany()
    @JoinTable(name = "WATCH_FUNCTION")
    private List<MovementFunction> movementFunctions;

    @ManyToMany()
    @JoinTable(name = "WATCH_MATERIAL")
    private List<CaseMaterial> caseMaterials;

    public MovementType getMovementType() {
        return movementType;
    }

    public void setMovementType(MovementType movementType) {
        this.movementType = movementType;
    }

    public String getBraceletMaterial() {
        return braceletMaterial;
    }

    public void setBraceletMaterial(String braceletMaterial) {
        this.braceletMaterial = braceletMaterial;
    }

    public Color getDialColor() {
        return dialColor;
    }

    public void setDialColor(Color dialColor) {
        this.dialColor = dialColor;
    }

    public List<MovementFunction> getMovementFunctions() {
        return movementFunctions;
    }

    public void setMovementFunctions(List<MovementFunction> movementFunctions) {
        this.movementFunctions = movementFunctions;
    }

    public List<CaseMaterial> getCaseMaterials() {
        return caseMaterials;
    }

    public void setCaseMaterials(List<CaseMaterial> caseMaterials) {
        this.caseMaterials = caseMaterials;
    }
}
